package com.panda.entity.po;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import java.io.Serializable;

/**
 * (User)表实体类
 *
 * @author makejava
 * @since 2022-04-25 11:09:02
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@TableName("t_user")
public class User extends Model<User> {
    //主键
    @TableId(type = IdType.AUTO)
    private Long id;
    //用户名

    private String username;

    //昵称
    private String nickname;
    //邮箱
    private String email;
    //头像
    private String avatar;

    private Date lastLogin;

    private String type;
    //性别，man男，woman女，unknown未填写
    private String sex;

    @TableField(fill = FieldFill.INSERT)
    private Long createBy;
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateBy;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;
    //密码
    private String passwordHash;
    //用户简介
    private String detail;

//    拥有管理员权限
    private String isAdmin;
}

